package com.yupi.yupicturebackend.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yupi.yupicturebackend.model.dto.SpaceAddRequest;
import com.yupi.yupicturebackend.model.dto.SpaceQueryRequest;
import com.yupi.yupicturebackend.model.entity.Space;
import com.yupi.yupicturebackend.model.entity.User;
import com.yupi.yupicturebackend.model.vo.SpaceVO;

import javax.servlet.http.HttpServletRequest;

/**
* @author chenhx
* @description 针对表【space(空间)】的数据库操作Service
* @createDate 2025-06-22 22:05:44
*/
public interface SpaceService extends IService<Space> {

    public QueryWrapper<Space> getQueryWrapper(SpaceQueryRequest SpaceQueryRequest);

    SpaceVO getSpaceVO(Space Space, HttpServletRequest httpRequest);

    public Page<SpaceVO> getSpaceVOPage(Page<Space> SpacePage, HttpServletRequest request);

    public void validSpace(Space space,boolean add);

    public void fillSpaceBySpaceLevel(Space space);

    long addSpace(SpaceAddRequest spaceAddRequest, User loginUser);

    void checkSpaceAuth(User loginUser, Space space);
}

